﻿using System;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Soundteller.Application.Facade
{
    public class GraphicsContext
    {
        private static GraphicsDevice _graphicsDevice;
        public static GraphicsDevice GraphicsDevice 
        {
            get
            {
                if (_graphicsDevice == null) throw new InvalidOperationException("GraphicsDevice is empty");

                return _graphicsDevice;
            }
            set
            {
                _graphicsDevice = value;
            }
        }

        private static ContentManager _content;
        public static ContentManager Content
        {
            get
            {
                if (_content == null) throw new InvalidOperationException("ContentManager is empty");

                return _content;
            }
            set
            {
                _content = value;
            }
        }
    }
}
